package cn.cangfei.massage.mapper;

import cn.cangfei.massage.dto.MassageDoctorDTO;
import cn.cangfei.massage.entity.MassageDoctor;
import cn.cangfei.massage.entity.MassageDoctorExample;

import java.util.List;

import org.apache.ibatis.annotations.Param;

public interface MassageDoctorMapper {
    long countByExample(MassageDoctorExample example);

    int deleteByExample(MassageDoctorExample example);

    int deleteByPrimaryKey(Long id);

    int insert(MassageDoctor record);

    int insertSelective(MassageDoctor record);

    List<MassageDoctor> selectByExample(MassageDoctorExample example);

    MassageDoctor selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") MassageDoctor record, @Param("example") MassageDoctorExample example);

    int updateByExample(@Param("record") MassageDoctor record, @Param("example") MassageDoctorExample example);

    int updateByPrimaryKeySelective(MassageDoctor record);

    int updateByPrimaryKey(MassageDoctor record);


    List<MassageDoctorDTO> getInfoByMassageId(@Param("massageId") Long massageId);

    List<MassageDoctorDTO> getInfoByMassageIds(@Param("massageId") Long massageId);

    List<MassageDoctorDTO> getInfoByMassageIdAndName(@Param("massageId") Long massageId, @Param("name") String name);

    /**
     * 根据hospId查询师傅个数
     *
     * @param massageId
     * @return
     */
    Integer getDoctorByMassageId(@Param("massageId") Long massageId);

    Integer count(@Param("name") String name, @Param("massageId") Long massageId);
}
